Type Safety for JavaScript

نویسنده

  • Ben Weber
چکیده

JavaScript is a client-side scripting language for the web and has become increasingly popular with the introduction of AJAX. JavaScript is a dynamic-typed language and is closer to a functional language than a procedural language. Runtime errors can occur in JavaScript due to invalid type conversions and accesses to undefined members of objects. One solution is the use of type systems to validate script before it is executed. Current work has focused on implementing type inference in JavaScript to statically check for errors. Additionally, the development of the JavaScript 2.0 specification will enhance the type safety of JavaScript applications.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

JSTyper: Type inference for JavaScript

As with all untyped languages, JavaScript programs can contain type-mismatch-style errors. These mistakes do not necessarily cause runtime errors and can lead to subtle faults in deployed web apps. Type checking key portions of JavaScript applications can identify these mistakes early. Previous efforts to augment JavaScript with a type system have led to syntax extensions and compulsory type an...

متن کامل

Type Inference for Scripting Languages

JavaScript is a powerful imperative object based language made popular by its use in web pages. It supports flexible program development by allowing dynamic addition of members to objects. Code is dynamically typed: a runtime access to a non-existing member causes an error. In this paper we first develop a formalism of JavaScript, JS0, and a static type system that will detect such type errors....

متن کامل

Type Checking for JavaScript

JavaScript is a powerful imperative object based language made popular by its use in web pages. It supports flexible program development by allowing dynamic addition of members to objects. Code is dynamically typed: a runtime access to a non-existing member causes an error. We suggest two static type systems for JavaScript that will detect such runtime type errors. Therefore, programmers can ha...

متن کامل

Towards a Type System for Analyzing JavaScript Programs

JavaScript is a popular language for client-side web scripting. It has a dubious reputation among programmers for two reasons. First, many JavaScript programs are written against a rapidly evolving API whose implementations are sometimes contradictory and idiosyncratic. Second, the language is only weakly typed and comes virtually without development tools. The present work is a first attempt t...

متن کامل

Trace Typing: An Approach for Evaluating Retrofitted Type Systems

Recent years have seen growing interest in the retrofitting of type systems onto dynamically-typed programming languages, in order to improve type safety, programmer productivity, orperformance. In such cases, type system developers must strike a delicate balance betweendisallowing certain coding patterns to keep the type system simple, or including them at theexpense of additio...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008